<!DOCTYPE html>
<!-- saved from url=(0065)http://www.17sucai.com/preview/1268063/2018-08-03/Mail/index.html -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>消费记录</title>
<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta content="telephone=no" name="format-detection">
<link rel="icon" href="/carworld_weixin/favicon.ico" type="image/x-icon">
<link href="/carworld_weixin/css/order-style.css" rel="stylesheet" type="text/css">
<link href="/carworld_weixin/css/loader.min.css" rel="stylesheet">
<script type="text/javascript" src="/carworld_weixin/js/jquery-3.3.1.min.js"></script>
<script src="/carworld_weixin/js/loading.js"></script>
<style type="text/css">
.tb960x90 {
	display: none !important;
	display: none
}
</style>
</head>
<body>
	<section class="aui-flexView">
		<header class="aui-navBar aui-navBar-fixed">
			<a href="javascript:history.back(-1)" class="aui-navBar-item">
				<i class="icon icon-return"></i>
			</a>
			<div class="aui-center">
				<span class="aui-center-title">我的消费订单</span>
			</div>
			<a href="javascript:;" class="aui-navBar-item">
				<i class="icon icon-sys"></i>
			</a>
		</header>
		<section class="aui-scrollView">
			<div class="aui-tab" data-ydui-tab="">
				<div class="divHeight"></div>
				<!--动态显示订单信息 start  -->
				<div class="tab-panel" id="myOrderList"></div>
				<!--动态显示订单信息 end  -->
			</div>
		</section>
	</section>
	<script>
		$(document).ready(function() {
			paidOrderList();
		});

		//查看已完成订单
		function paidOrderList() {
			$('#myOrderList').empty();
			$.ajax({
				type : 'GET',
				url : '/carworld_weixin/order/myOrderList',
				dataType : 'json',
				contentType : 'application/json',
				data : {
					'orderStatus' : '1'
				},
				success : function(data) {
					var count=data.shopOrder.length;
					if (0 == count) {
						$('#myOrderList').append('<div style="text-align:center;font-size:14px;color:#bbb;">您还没有待支付的订单哦~</div>');
						loading(false);
						return;
					}
					$.each(data.shopOrder, function(index, elem) {
						var head = '<div class="tab-item"><a href="javascript:void(0);" class="aui-well-item aui-well-item-clear">'
								+ '<div class="aui-well-item-hd"></div>' + '<div class="aui-well-item-bd"><h3>'
								+ elem.shop_order_createtime + '</h3></div>' + '<span class="aui-well-item-fr" style="background-image: none">已完成</span></a>';
						$('#myOrderList').append(head);

						$.each(elem.shopRecord, function(i, value) {
							var body = '<div class="aui-mail-product"><a href="javascript:;" class="aui-mail-product-item">'
									+ '<div class="aui-mail-product-item-hd"><img src="'+value.spare_photo+'" alt=""></div>' + '<div class="aui-mail-product-item-bd"><p>'
									+ value.spare_model + '</p></div>' + '<div class="aui-mail-product-right"><h4>￥' + value.shop_record_price + '</h4><span>x'+value.shop_record_number+'</span>'
									+ '</div></a></div>';
							$('#myOrderList').append(body);
						})
						var tail = '<a href="javascript:;" class="aui-mail-payment"><p>实付款: <i>￥' + elem.shop_order_totalprice
								+ '</i></p></a><div class="aui-mail-button">' + '<a href="/carworld_weixin/">返回首页</a></div></div><div class="divHeight"></div>';
						$('#myOrderList').append(tail);
					});
					loading(false);
				}
			});
		}
		

		//发送分红通知
		function dividendNotify(){
			$.ajax({
				type : 'GET',
				url : '/carworld_weixin/order/dividendNotify',
				contentType : 'application/json',
				success : function(data) {
				}
			});
		} 


	</script>
</body>
</html>